package DTO;

public class ForeignKey {
	private String TargetField;
	private String SourceField;
	private String TargetTable;
	public String getTargetField() {
		return TargetField;
	} 
	public void setTargetField(String targetField) {
		TargetField = targetField;
	}
	public String getSourceField() {
		return SourceField;
	}
	public void setSourceField(String sourceField) {
		SourceField = sourceField;
	}
	public String getTargetTable() {
		return TargetTable;
	}
	public void setTargetTable(String targetTable) {
		this.TargetTable = targetTable;
	}
	
	public ForeignKey(String targetTable, String srcField, String targetField)
	{
		this.setSourceField(srcField);
		this.setTargetField(targetField);
		this.setTargetTable(targetTable);
	}
	
	public boolean Equal(ForeignKey foreignKey)
	
	{
		return(this.getSourceField().equals(foreignKey.getSourceField()) &&
				this.getTargetField().equals(foreignKey.getTargetField()) &&
				this.getTargetTable().equals(foreignKey.getTargetTable()));
	}
}
